import request from '@/utils/request'

// 查询景点信息列表
export function listSpots(query) {
  return request({
    url: '/system/spots/list',
    method: 'get',
    params: query
  })
}

// 查询景点信息详细
export function getSpots(spotId) {
  return request({
    url: '/system/spots/' + spotId,
    method: 'get'
  })
}

// 新增景点信息
export function addSpots(data) {
  return request({
    url: '/system/spots',
    method: 'post',
    data: data
  })
}

// 修改景点信息
export function updateSpots(data) {
  return request({
    url: '/system/spots',
    method: 'put',
    data: data
  })
}

// 删除景点信息
export function delSpots(spotId) {
  return request({
    url: '/system/spots/' + spotId,
    method: 'delete'
  })
}

// 删除景点所属门店
export function deleteSpotsAndStore(spotId, storeId) {
  return request({
    url: '/system/spots/deleteSpotsAndStore/' + spotId + "/" + storeId,
    method: 'post'
  })
}

// 添加景点所属门店
export function addSpotsAndStore(spotId, storeId) {
  return request({
    url: '/system/spots/addSpotsAndStore/' + spotId + "/" + storeId,
    method: 'post'
  })
}
